# -*- coding: utf-8 -*-
"""
Coroutines and concurrency/Tornado Process/test01.py
"""
import tornado.web
import asyncio
import tornado.process


def cup_cnt():
    """
    tornado.process.cpu_count()
    :return:
    """
    r_message = f"Current server CPU core count: {tornado.process.cpu_count()}"
    print(r_message)


def task_id():
    """
    tornado.process.task_id()
    :return:
    """
    r_message = f"Current task id: {tornado.process.task_id()}"
    print(r_message)


async def main():
    cup_cnt()
    task_id()
    await asyncio.Event().wait()


if __name__ == '__main__':
    asyncio.run(main())
